package com.web.portal.response;

public enum ResponseState {
    SUCCESS(20000, true, "操作成功"),
    LOGIN_SUCCESS(20001, true, "登录成功"),
    JOIN_IN_SUCCESS(20002, true, "注册成功"),
    FAILED(40000, false, "操作失败"),
    GET_RESOURCE_FAILED(4001, false, "获取资源失败"),
    ACCOUNT_NOT_LOGIN(4002, false, "账号未登录"),
    PARAMS_ILL(30000, false, "参数错误"),
    PERMISSION_DENIED(40000, false, "权限不够"),
    NOT_LOGIN(50000, false, "账号未登录"),
    ERROR_404(40004,false,"页面丢失"),
    ERROR_403(40005,false,"权限不足"),
    ERROR_405(40006,false,"相同繁忙，请稍后重试"),
    ERROR_505(40003,false,"请求错误，请检查所提交数据"),
    LOGIN_FAILED(4999, false, "登录失败");

    private int code;
    private boolean isSuccess;
    private String message;

    ResponseState(int code, boolean isSuccess, String message) {
        this.code = code;
        this.isSuccess = isSuccess;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public boolean isSuccess() {
        return isSuccess;
    }

    public String getMessage() {
        return message;
    }
}
